import request from '@/utils/request'
import type { scheduleAdd } from '@/model'
export const getScheduleList = () => request.get('/getScheduleList')

export const addSchedule = (ruleForm: scheduleAdd) =>
    request.post('/addSchedule', JSON.stringify(ruleForm), {
      headers: {
        'Content-Type': 'application/json'
      }
    })
export const deleteSchedule = (id: number) => request.get(`/deleteSchedule/${id}`)
export const updateSchedule = (updateScheduleData: scheduleAdd) =>
    request.post('/updateSchedule', JSON.stringify(updateScheduleData), {
      headers: {
        'Content-Type': 'application/json'
      }
    })